Cisco Packet Tracer Extensions API 8.1.0
API for communication between Cisco Packet Tracer application and its extension applications and modules.
Public Member Functions | List of all members
PTPClock Class Reference

This file holds CPTPClock class declaration. More...

Public Member Functions

void setMode (PTPMode)
 Sets the mode. More...
 
PTPMode getMode ()
 Returns the mode. More...
 
string getModeStr ()
 Returns the mode as a string. More...
 
int getNumOfPorts ()
 Returns the number of ports. More...
 
void setProfile (PTPProfile)
 Sets the profile type. More...
 
PTPProfile getProfile ()
 Gets the profile type. More...
 
string getProfileStr ()
 Returns the profile as a string. More...
 
void setDelayMechanism (DelayMechanism)
 Sets the delay mechanism type. More...
 
int getDelayMechanism ()
 Gets the profile type. More...
 
string getDelayMechanismStr ()
 Returns the delay mechanisim as a string. More...
 
void setPriority1 (int)
 Sets priority 1 to the given value. More...
 
void setPriority2 (int)
 Sets priority 2 to the given value. More...
 
void setPtpTime (string)
 Sets ptp time to the given value. More...
 
void clearConfig ()
 Clears the config. More...
 
void init ()
 Runs the init setup. More...
 

Detailed Description

This file holds CPTPClock class declaration.

Member Function Documentation

◆ clearConfig()

void PTPClock::clearConfig ( )

Clears the config.

◆ getDelayMechanism()

int PTPClock::getDelayMechanism ( )

Gets the profile type.

Returns
int, the profile type. Timer types: eDefault = 0, ePower = 1

◆ getDelayMechanismStr()

string PTPClock::getDelayMechanismStr ( )

Returns the delay mechanisim as a string.

Returns
string, profile strings: "End to End", "Peer to Peer"

◆ getMode()

PTPMode PTPClock::getMode ( )

Returns the mode.

Returns
enum<PTPMode>, the modes. Mode types: eE2etransparent = 0, eBoundary = 1, eForward = 2

◆ getModeStr()

string PTPClock::getModeStr ( )

Returns the mode as a string.

Returns
string, Mode strings: "e2etransparent", "boundary", "forward"

◆ getNumOfPorts()

int PTPClock::getNumOfPorts ( )

Returns the number of ports.

Returns
int, the number of ports.

◆ getProfile()

PTPProfile PTPClock::getProfile ( )

Gets the profile type.

Returns
enum<PTPProfile>, the profile type. Timer types: eDefault = 0, ePower = 1

◆ getProfileStr()

string PTPClock::getProfileStr ( )

Returns the profile as a string.

Returns
string, profile strings: "Default", "Power"

◆ init()

void PTPClock::init ( )

Runs the init setup.

◆ setDelayMechanism()

void PTPClock::setDelayMechanism ( DelayMechanism  )

Sets the delay mechanism type.

Parameters
delay,thetype of delay. Timer types: eEnd2End = 0, ePeer2Peer = 1

◆ setMode()

void PTPClock::setMode ( PTPMode  )

Sets the mode.

Parameters
mode,thetype of timer. Timer types: eE2etransparent = 0, eBoundary = 1, eForward = 2

◆ setPriority1()

void PTPClock::setPriority1 ( int  )

Sets priority 1 to the given value.

Parameters
val,valueto use.

◆ setPriority2()

void PTPClock::setPriority2 ( int  )

Sets priority 2 to the given value.

Parameters
val,valueto use.

◆ setProfile()

void PTPClock::setProfile ( PTPProfile  )

Sets the profile type.

Parameters
profile,thetype of timer. Timer types: eDefault = 0, ePower = 1

◆ setPtpTime()

void PTPClock::setPtpTime ( string  )

Sets ptp time to the given value.

Parameters
time,timeto use.

The documentation for this class was generated from the following file: